<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
<!-- Copyright 1997 The Open Group, All Rights Reserved -->
<title>&lt;unistd.h&gt;</title>
</head><body bgcolor=white>
<center>
<font size=2>
The Single UNIX &reg; Specification, Version 2<br>
Copyright &copy; 1997 The Open Group

</font></center><hr size=2 noshade>
<xref type="10" name="unistd"></xref>
<h4><a name = "tag_000_010_274">&nbsp;</a>NAME</h4><blockquote>
unistd.h - standard symbolic constants and types
</blockquote><h4><a name = "tag_000_010_275">&nbsp;</a>SYNOPSIS</h4><blockquote>
<pre><code>

#include &lt;unistd.h&gt;
</code>
</pre>
</blockquote><h4><a name = "tag_000_010_276">&nbsp;</a>DESCRIPTION</h4><blockquote>
The
<i>&lt;unistd.h&gt;</i>
header defines miscellaneous symbolic constants and types,
and declares miscellaneous functions.
The contents of this header are shown below.
<h5><a name = "tag_000_010_276_001">&nbsp;</a>Version Test Macros</h5>
The following symbolic constants are defined:
<dl compact>

<dt>_POSIX_VERSION<dd>

Integer value indicating version of the ISO&nbsp;POSIX-1 standard (C language binding).

<dt>_POSIX2_VERSION<dd>

Integer value indicating version of the ISO POSIX-2 standard (Commands).

<dt>_POSIX2_C_VERSION<dd>

Integer value indicating version of the ISO POSIX-2 standard (C language binding).

<dt>_XOPEN_VERSION<dd>

Integer value indicating version of the X/Open Portability Guide
to which the implementation conforms.

</dl>
<p>
_POSIX_VERSION is defined in the ISO&nbsp;POSIX-1 standard.
It changes with each new version of the ISO&nbsp;POSIX-1 standard.
<p>
_POSIX2_VERSION is defined to have the value of the ISO POSIX-2 standard's
POSIX2_VERSION limit. 
It changes with each new version of the ISO POSIX-2 standard.
<p>
_POSIX2_C_VERSION is defined in the ISO POSIX-2 standard.
It changes with each new version of the ISO POSIX-2 standard.
When the C language binding option of the
ISO POSIX-2 standard and therefore the X/Open POSIX2 C-language Binding
Feature Group is not supported,
_POSIX2_C_VERSION will be set to -1.
<p>
_XOPEN_VERSION is defined as an integer value equal to 500.
<p>
_XOPEN_XCU_VERSION is defined as an integer value indicating the version of
the <b>XCU</b> specification to which the implementation conforms.
If the value is -1, no commands and utilities are provided on the
implementation.  If the value is greater
than or equal to 4, the functionality associated with the following symbols
is also supported (see
<xref href=mand_sym><a href="#tag_000_010_276_002">
Mandatory Symbolic Constants
</a></xref>
and
<xref href=opt_sym><a href="#tag_000_010_276_003">
Constants for Options and Feature Groups
</a></xref>):
<pre>
_POSIX2_C_BIND
_POSIX2_C_VERSION
_POSIX2_CHAR_TERM
_POSIX2_LOCALEDEF
_POSIX2_UPE
_POSIX2_VERSION
</pre>
<p>
If this constant is not defined use the
<i><a href="sysconf.html">sysconf()</a></i>
function to determine which features are supported.
<p>
Each of the following symbolic constants is defined only if the
implementation supports the indicated issue of the X/Open Portability
Guide:
<dl compact>

<dt>_XOPEN_XPG2<dd>

X/Open Portability Guide, Volume 2, January 1987,
XVS System Calls and Libraries
(ISBN:&nbsp;0-444-70175-3).

<dt>_XOPEN_XPG3<dd>

X/Open Specification, February 1992,
System Interfaces and Headers, Issue 3
(ISBN:&nbsp;1-872630-37-5, C212); this specification was formerly
X/Open Portability Guide, Issue 3, Volume 2, 
January 1989, XSI System Interface and Headers
(ISBN:&nbsp;0-13-685843-0, XO/XPG/89/003).

<dt>_XOPEN_XPG4<dd>

X/Open CAE Specification, July 1992, 
System Interfaces and Headers, Issue 4
(ISBN:&nbsp;1-872630-47-2, C202).

<dt>_XOPEN_UNIX<dd>

X/Open CAE Specification, January 1997,
System Interfaces and Headers, Issue 5
(ISBN:&nbsp;1-85912-181-0, C606).

</dl>
<h5><a name = "tag_000_010_276_002">&nbsp;</a>Mandatory Symbolic Constants</h5>
<xref type="5" name="mand_sym"></xref>
Although all implementations conforming to this specification support
all of the FIPS features described below, there may be system-dependent or
file-system-dependent configuration procedures that can remove or modify any
or all of these features.  Such configurations should not be made if strict
FIPS compliance is required.
<p>
The following symbolic constants are either undefined or defined with a
value other than -1. If a constant is undefined, an application should
use the
<i><a href="sysconf.html">sysconf()</a></i>,
<i><a href="pathconf.html">pathconf()</a></i>
or
<i><a href="fpathconf.html">fpathconf()</a></i>
functions to determine which features are present on the system at that time
or for the particular pathname in question.
<dl compact>

<dt>_POSIX_CHOWN_RESTRICTED<dd>

The use of
<i><a href="chown.html">chown()</a></i>
is restricted
to a process with appropriate privileges, and to changing the group ID
of a file only to the effective group ID of the process or to one of
its supplementary group IDs.

<dt>_POSIX_NO_TRUNC<dd>

Pathname components longer than {NAME_MAX} generate an error.

<dt>_POSIX_VDISABLE<dd>

Terminal special characters defined in
<i><a href="termios.h.html">&lt;termios.h&gt;</a></i>
can be disabled using this character value.

<dt>_POSIX_SAVED_IDS<dd>

Each process has a saved set-user-ID and a saved set-group-ID.

<dt>_POSIX_JOB_CONTROL<dd>

Implementation supports job control.

</dl>
<p>
_POSIX_CHOWN_RESTRICTED, _POSIX_NO_TRUNC and _POSIX_VDISABLE
will have values other than -1.
<br>
<p>
The following symbolic constants  are always defined to unspecified
values to indicate that this functionality from the POSIX Threads Extension is always
present on XSI-conformant systems:
<dl compact>

<dt>_POSIX_THREADS<dd>

The implementation supports the threads option.

<dt>_POSIX_THREAD_ATTR_STACKADDR<dd>

The implementation supports the thread stack address attribute option.

<dt>_POSIX_THREAD_ATTR_STACKSIZE<dd>

The implementation supports the thread stack size attribute option.

<dt>_POSIX_THREAD_PROCESS_SHARED<dd>

The implementation supports the process-shared synchronisation option.

<dt>_POSIX_THREAD_SAFE_FUNCTIONS<dd>

The implementation supports the thread-safe functions option.

</dl>
<h5><a name = "tag_000_010_276_003">&nbsp;</a>Constants for Options and Feature Groups</h5>
<xref type="5" name="opt_sym"></xref>
<p>
The following symbolic constants are defined to have the value -1
if the implementation will never provide the feature, and to have a
value other than -1 if the implementation always provides the
feature.
If these are undefined, the
<i><a href="sysconf.html">sysconf()</a></i>
function can be used to determine whether the feature is provided for
a particular invocation of the application.
<dl compact>

<dt>_POSIX2_C_BIND<dd>

Implementation supports the C Language Binding option.
This will always have a value other than -1.

<dt>_POSIX2_C_DEV<dd>

Implementation supports the C Language Development Utilities option.

<dt>_POSIX2_CHAR_TERM<dd>

Implementation supports at least one terminal type.

<dt>_POSIX2_FORT_DEV<dd>

Implementation supports the FORTRAN Development Utilities option.

<dt>_POSIX2_FORT_RUN<dd>

Implementation supports the FORTRAN Run-time Utilities option.

<dt>_POSIX2_LOCALEDEF<dd>

Implementation supports the creation of locales by the
<i><a href="../xcu/localedef.html">localedef</a></i>
utility.

<dt>_POSIX2_SW_DEV<dd>

Implementation supports the Software Development Utilities option.

<dt>_POSIX2_UPE<dd>

The implementation supports the User Portability Utilities option.

<dt>_XOPEN_CRYPT<dd>

The implementation supports the X/Open Encryption Feature Group.

<dt>_XOPEN_ENH_I18N<dd>

The implementation supports the Issue 4, Version 2 Enhanced Internationalisation
Feature Group.
This is always set to a value other than -1.

<dt>_XOPEN_LEGACY<dd>

The implementation supports the Legacy Feature Group.

<dt>_XOPEN_REALTIME<dd>

The implementation supports the X/Open Realtime Feature Group.

<dt>_XOPEN_REALTIME_THREADS<dd>

The implementation supports the X/Open Realtime Threads Feature Group.

<dt>_XOPEN_SHM<dd>

The implementation supports the Issue 4, Version 2 Shared Memory Feature Group.
This is always set to a value other than -1.

<dt>_XBS5_ILP32_OFF32<dd>

Implementation provides a C-language compilation environment with 
32-bit
<b>int</b>,
<b>long</b>,
<b>pointer</b>
and
<b>off_t</b>
types.

<dt>_XBS5_ILP32_OFFBIG<dd>

Implementation provides a C-language compilation environment with 
32-bit
<b>int</b>,
<b>long</b>
and
<b>pointer</b>
types and an
<b>off_t</b>
type using at least 64 bits.

<dt>_XBS5_LP64_OFF64<dd>

Implementation provides a C-language compilation environment with
32-bit
<b>int</b>
and 64-bit
<b>long</b>,
<b>pointer</b>
and
<b>off_t</b>
types.

<dt>_XBS5_LPBIG_OFFBIG<dd>

Implementation provides a C-language compilation environment with an
<b>int</b>
type using at least 32 bits and
<b>long</b>,
<b>pointer</b>
and
<b>off_t</b>
types using at least 64 bits.

</dl>
<p>
If _XOPEN_REALTIME is defined to have a value other than -1, then
the following symbolic constants will be defined to an unspecified
value to indicate that the features are supported.
<dl compact>

<dt>_POSIX_ASYNCHRONOUS_IO<dd>

Implementation supports the Asynchronous Input and Output option.

<dt>_POSIX_MEMLOCK<dd>

Implementation supports the Process Memory Locking option.

<dt>_POSIX_MEMLOCK_RANGE<dd>

Implementation supports the Range Memory Locking option.

<dt>_POSIX_MESSAGE_PASSING<dd>

Implementation supports the Message Passing option.

<dt>_POSIX_PRIORITY_SCHEDULING<dd>

Implementation supports the Process Scheduling option.

<dt>_POSIX_REALTIME_SIGNALS<dd>

Implementation supports the Realtime Signals Extension option.

<dt>_POSIX_SEMAPHORES<dd>

Implementation supports the Semaphores option.

<dt>_POSIX_SHARED_MEMORY_OBJECTS<dd>

Implementation supports the Shared Memory Objects option.

<dt>_POSIX_SYNCHRONIZED_IO<dd>

Implementation supports the Synchronised Input and Output option.

<dt>_POSIX_TIMERS<dd>

Implementation supports the Timers option.

</dl>
<p>
The following symbolic constants are always defined to unspecified
values to indicate that the functionality is always present on
XSI-conformant systems.
<dl compact>

<dt>_POSIX_FSYNC<dd>

Implementation supports the File Synchronisation option.

<dt>_POSIX_MAPPED_FILES<dd>

Implementation supports the Memory Mapped Files option.

<dt>_POSIX_MEMORY_PROTECTION<dd>

Implementation supports the Memory Protection option.

</dl>
<p>
The following symbolic constant will be defined if the option is
supported; otherwise, it will be undefined:
<dl compact>

<dt>_POSIX_PRIORITIZED_IO<dd>

Implementation supports the Prioritized Input and Output option.

</dl>
<p>
If _XOPEN_REALTIME_THREADS is defined to have a value other than
-1, then the following symbolic constants will be defined to an
unspecified value to indicate that the features are supported:
<dl compact>

<dt>_POSIX_THREAD_PRIORITY_SCHEDULING<dd>

The implementation supports the thread execution scheduling option.

<dt>_POSIX_THREAD_PRIO_INHERIT<dd>

The implementation supports the priority inheritance option.

<dt>_POSIX_THREAD_PRIO_PROTECT<dd>

The implementation supports the priority protection option.

</dl>
<h5><a name = "tag_000_010_276_004">&nbsp;</a>Execution-time Symbolic Constants</h5>
<p>
If any of the following constants are not defined in the header
<i>&lt;unistd.h&gt;</i>,
the value varies depending on the file to which it is applied.
<p>
If any of the following constants are defined to have value -1
in the header
<i>&lt;unistd.h&gt;</i>,
the implementation will not provide the option on any file;
if any are defined to have a value other than -1 in the header
<i>&lt;unistd.h&gt;</i>,
the implementation will provide the option on all applicable files.
<p>
All of the following constants, whether defined in
<i>&lt;unistd.h&gt;</i>
or not, may be queried with respect to a specific file using the
<i><a href="pathconf.html">pathconf()</a></i>
or
<i><a href="fpathconf.html">fpathconf()</a></i>
functions.
<dl compact>

<dt>_POSIX_ASYNC_IO<dd>

Asynchronous input or output operations may be performed for the
associated file.

<dt>_POSIX_PRIO_IO<dd>

Prioritized input or output operations may be performed for the
associated file.

<dt>_POSIX_SYNC_IO<dd>

Synchronised input or output operations may be performed for the
associated file.

</dl>
<h5><a name = "tag_000_010_276_005">&nbsp;</a>Constants for Functions</h5>
The following symbolic constant is defined:
<dl compact>

<dt>NULL<dd>
Null pointer

</dl>
<p>
The following symbolic constants are defined for the
<i><a href="access.html">access()</a></i>
function:
<dl compact>

<dt>R_OK<dd>
Test for read permission.

<dt>W_OK<dd>
Test for write permission.

<dt>X_OK<dd>
Test for execute (search) permission.

<dt>F_OK<dd>
Test for existence of file.

</dl>
<p>
The constants F_OK, R_OK, W_OK and X_OK and the expressions
<i>R_OK|W_OK</i>,
<i>R_OK|X_OK</i>
and
<i>R_OK|W_OK|X_OK</i>
all have distinct values.
<p>
<p>
The following symbolic constants are defined for the
<i><a href="confstr.html">confstr()</a></i>
function:
<dl compact>

<dt>_CS_PATH<dd>

If the ISO POSIX-2 standard is supported, this is the value for the
environment variable that finds all standard utilities.  Otherwise
the meaning of this value is unspecified.

<dt>_CS_XBS5_ILP32_OFF32_CFLAGS<dd>

If <i>sysconf</i>(_SC_XBS5_ILP32_OFF32) returns -1, the
meaning of this value is unspecified.  Otherwise, this
value is the set of initial options to be given to the
<i>cc</i> and <i>c89</i> utilities to build an application using a
programming model with 32-bit int, long, pointer, and
off_t types.

<dt>_CS_XBS5_ILP32_OFF32_LDFLAGS<dd>

If <i>sysconf</i>(_SC_XBS5_ILP32_OFF32) returns -1, the
meaning of this value is unspecified.  Otherwise, this
value is the set of final options to be given to the <i>cc</i>
and <i>c89</i> utilities to build an application using a
programming model with 32-bit int, long, pointer, and
off_t types.

<dt>_CS_XBS5_ILP32_OFF32_LIBS<dd>

If <i>sysconf</i>(_SC_XBS5_ILP32_OFF32) returns -1, the
meaning of this value is unspecified.  Otherwise, this
value is the set of libraries to be given to the <i>cc</i> and
<i>c89</i> utilities to build an application using a
programming model with 32-bit int, long, pointer, and
off_t types.

<dt>_CS_XBS5_ILP32_OFF32_LINTFLAGS<dd>

If <i>sysconf</i>(_SC_XBS5_ILP32_OFF32) returns -1, the
meaning of this value is unspecified.  Otherwise, this
value is the set of options to be given to the <i>lint</i>
utility to check application source using a programming
model with 32-bit int, long, pointer, and off_t types.

<dt>_CS_XBS5_ILP32_OFFBIG_CFLAGS<dd>

If <i>sysconf</i>(_SC_XBS5_ILP32_OFFBIG) returns -1, the
meaning of this value is unspecified.  Otherwise, this
value is the set of initial options to be given to the
<i>cc</i> and <i>c89</i> utilities to build an application using a
programming model with 32-bit int, long, and pointer
types, and an off_t type using at least 64 bits.

<dt>_CS_XBS5_ILP32_OFFBIG_LDFLAGS<dd>

If <i>sysconf</i>(_SC_XBS5_ILP32_OFFBIG) returns -1, the
meaning of this value is unspecified.  Otherwise, this
value is the set of final options to be given to the 
<i>cc</i> and <i>c89</i> utilities to build an application using a
programming model with 32-bit int, long, and pointer
types, and an off_t type using at least 64 bits.

<dt>_CS_XBS5_ILP32_OFFBIG_LIBS<dd>

If <i>sysconf</i>(_SC_XBS5_ILP32_OFFBIG) returns -1, the
meaning of this value is unspecified.  Otherwise, this
value is the set of libraries to be given to the <i>cc</i> and
<i>c89</i> utilities to build an application using a
programming model with 32-bit int, long, and pointer
types, and an off_t type using at least 64 bits.

<dt>_CS_XBS5_ILP32_OFFBIG_LINTFLAGS<dd>

If <i>sysconf</i>(_SC_XBS5_ILP32_OFFBIG) returns -1, the
meaning of this value is unspecified.  Otherwise, this
value is the set of options to be given to the <i>lint</i>
utility to check an application using a programming
model with 32-bit int, long, and pointer types, and an
off_t type using at least 64 bits.

<dt>_CS_XBS5_LP64_OFF64_CFLAGS<dd>

If <i>sysconf</i>(_SC_XBS5_LP64_OFF64) returns -1, the meaning
of this value is unspecified.  Otherwise, this value is
the set of initial options to be given to the <i>cc</i> and
<i>c89</i> utilities to build an application using a
programming model with 64-bit int, long, pointer, and
off_t types.

<dt>_CS_XBS5_LP64_OFF64_LDFLAGS<dd>

If <i>sysconf</i>(_SC_XBS5_LP64_OFF64) returns -1, the meaning
of this value is unspecified.  Otherwise, this value is
the set of final options to be given to the <i>cc</i> and <i>c89</i>
utilities to build an application using a programming
model with 64-bit int, long, pointer, and off_t types.

<dt>_CS_XBS5_LP64_OFF64_LIBS<dd>

If <i>sysconf</i>(_SC_XBS5_LP64_OFF64) returns -1, the meaning
of this value is unspecified.  Otherwise, this value is
the set of libraries to be given to the <i>cc</i> and <i>c89</i>
utilities to build an application using a programming
model with 64-bit int, long, pointer, and off_t types.

<dt>_CS_XBS5_LP64_OFF64_LINTFLAGS<dd>

If <i>sysconf</i>(_SC_XBS5_LP64_OFF64) returns -1, the meaning
of this value is unspecified.  Otherwise, this value is
the set of options to be given to the <i>lint</i> utility to
check application source using a programming model with
64-bit int, long, pointer, and off_t types.

<dt>_CS_XBS5_LPBIG_OFFBIG_CFLAGS<dd>

If <i>sysconf</i>(_SC_XBS5_LPBIG_OFFBIG) returns -1, the
meaning of this value is unspecified.  Otherwise, this
value is the set of initial options to be given to the
<i>cc</i> and <i>c89</i> utilities to build an application using a
programming model with an int type using at least 32
bits and long, pointer, and off_t types using at least
64 bits.

<dt>_CS_XBS5_LPBIG_OFFBIG_LDFLAGS<dd>

If <i>sysconf</i>(_SC_XBS5_LPBIG_OFFBIG) returns -1, the
meaning of this value is unspecified.  Otherwise, this
value is the set of final options to be given to the <i>cc</i>
and <i>c89</i> utilities to build an application using a
programming model with an int type using at least 32
bits and long, pointer, and off_t types using at least
64 bits.

<dt>_CS_XBS5_LPBIG_OFFBIG_LIBS<dd>

If <i>sysconf</i>(_SC_XBS5_LPBIG_OFFBIG) returns -1, the
meaning of this value is unspecified.  Otherwise, this
value is the set of libraries to be given to the <i>cc</i> and
<i>c89</i> utilities to build an application using a
programming model with an int type using at least 32
bits and long, pointer, and off_t types using at least
64 bits.

<dt>_CS_XBS5_LPBIG_OFFBIG_LINTFLAGS<dd>

If <i>sysconf</i>(_SC_XBS5_LPBIG_OFFBIG) returns -1, the
meaning of this value is unspecified.  Otherwise, this
value is the set of options to be given to the <i>lint</i>
utility to check application source using a programming
model with an int type using at least 32 bits and long,
pointer, and off_t types using at least 64 bits.

</dl>
<p>
The following symbolic constants are defined for the
<i><a href="lseek.html">lseek()</a></i>
and
<i><a href="fcntl.html">fcntl()</a></i>
functions (they have distinct values):
<dl compact>

<dt>SEEK_SET<dd>
Set file offset to <i>offset</i>.

<dt>SEEK_CUR<dd>
Set file offset to current plus <i>offset</i>.

<dt>SEEK_END<dd>
Set file offset to EOF plus <i>offset</i>.

</dl>
<p>
The following symbolic constants are defined for <i>sysconf</i>():
<p>
<pre>
_SC_2_C_BIND
_SC_2_C_DEV
_SC_2_C_VERSION
_SC_2_FORT_DEV
_SC_2_FORT_RUN
_SC_2_LOCALEDEF
_SC_2_SW_DEV
_SC_2_UPE
_SC_2_VERSION
_SC_ARG_MAX
_SC_AIO_LISTIO_MAX
_SC_AIO_MAX
_SC_AIO_PRIO_DELTA_MAX
_SC_ASYNCHRONOUS_IO
_SC_ATEXIT_MAX
_SC_BC_BASE_MAX
_SC_BC_DIM_MAX
_SC_BC_SCALE_MAX
_SC_BC_STRING_MAX
_SC_CHILD_MAX
_SC_CLK_TCK
_SC_COLL_WEIGHTS_MAX
_SC_DELAYTIMER_MAX
_SC_EXPR_NEST_MAX
_SC_FSYNC
_SC_GETGR_R_SIZE_MAX
_SC_GETPW_R_SIZE_MAX
_SC_IOV_MAX
_SC_JOB_CONTROL
_SC_LINE_MAX
_SC_LOGIN_NAME_MAX
_SC_MAPPED_FILES
_SC_MEMLOCK
_SC_MEMLOCK_RANGE
_SC_MEMORY_PROTECTION
_SC_MESSAGE_PASSING
_SC_MQ_OPEN_MAX
_SC_MQ_PRIO_MAX
_SC_NGROUPS_MAX
_SC_OPEN_MAX
_SC_PAGESIZE
_SC_PAGE_SIZE
_SC_PASS_MAX (<b>LEGACY</b>)
_SC_PRIORITIZED_IO
_SC_PRIORITY_SCHEDULING
_SC_RE_DUP_MAX
<br>
_SC_REALTIME_SIGNALS
_SC_RTSIG_MAX
_SC_SAVED_IDS
_SC_SEMAPHORES
_SC_SEM_NSEMS_MAX
_SC_SEM_VALUE_MAX
_SC_SHARED_MEMORY_OBJECTS
_SC_SIGQUEUE_MAX
_SC_STREAM_MAX
_SC_SYNCHRONIZED_IO
_SC_THREADS
_SC_THREAD_ATTR_STACKADDR
_SC_THREAD_ATTR_STACKSIZE
_SC_THREAD_DESTRUCTOR_ITERATIONS
_SC_THREAD_KEYS_MAX
_SC_THREAD_PRIORITY_SCHEDULING
_SC_THREAD_PRIO_INHERIT
_SC_THREAD_PRIO_PROTECT
_SC_THREAD_PROCESS_SHARED
_SC_THREAD_SAFE_FUNCTIONS
_SC_THREAD_STACK_MIN
_SC_THREAD_THREADS_MAX
_SC_TIMERS
_SC_TIMER_MAX
_SC_TTY_NAME_MAX
_SC_TZNAME_MAX
_SC_VERSION
_SC_XOPEN_VERSION
_SC_XOPEN_CRYPT
_SC_XOPEN_ENH_I18N
_SC_XOPEN_SHM
_SC_XOPEN_UNIX
_SC_XOPEN_XCU_VERSION
_SC_XOPEN_LEGACY
_SC_XOPEN_REALTIME
_SC_XOPEN_REALTIME_THREADS
_SC_XBS5_ILP32_OFF32
_SC_XBS5_ILP32_OFFBIG
_SC_XBS5_LP64_OFF64
_SC_XBS5_LPBIG_OFFBIG
</pre>
<p>
The two constants _SC_PAGESIZE and _SC_PAGE_SIZE may be defined to
have the same value.
<p>
The following symbolic constants are defined as possible values
for the <i>function</i> argument to the
<i><a href="lockf.html">lockf()</a></i>
function:
<dl compact>

<dt>F_LOCK<dd><index term="F-LOCK, "></index>
Lock a section for exclusive use.

<dt>F_ULOCK<dd><index term="F_ULOCK, "></index>
Unlock locked sections.

<dt>F_TEST<dd><index term="F_TEST, "></index>
Test section for locks by other processes.

<dt>F_TLOCK<dd><index term="F_TLOCK, "></index>
Test and lock a section for exclusive use.

</dl>
<p>
The following symbolic constants are defined for <i>pathconf</i>():
<p>
<pre>
_PC_ASYNC_IO
_PC_CHOWN_RESTRICTED
_PC_FILESIZEBITS
_PC_LINK_MAX
_PC_MAX_CANON
_PC_MAX_INPUT
_PC_NAME_MAX
_PC_NO_TRUNC
_PC_PATH_MAX
_PC_PIPE_BUF
_PC_PRIO_IO
_PC_SYNC_IO
_PC_VDISABLE
</pre>
<p>
The following symbolic constants are defined for file streams:
<dl compact>

<dt>STDIN_FILENO<dd>
File number of <i>stdin</i>.  It is 0.

<dt>STDOUT_FILENO<dd>
File number of <i>stdout</i>.  It is 1.

<dt>STDERR_FILENO<dd>
File number of <i>stderr</i>.  It is 2.

</dl>
<h5><a name = "tag_000_010_276_006">&nbsp;</a>Type Definitions</h5>
The
<b>size_t</b>,
<b>ssize_t</b>,
<b>uid_t</b>,
<b>gid_t</b>,
<b>off_t</b>
and
<b>pid_t</b>
types are defined as described in
<i><a href="systypes.h.html">&lt;sys/types.h&gt;</a></i>.
<p>
The
<b>useconds_t</b>
type is defined as described in
<i><a href="systypes.h.html">&lt;sys/types.h&gt;</a></i>.
<p>
The
<b>intptr_t</b>
type is defined as described in
<i><a href="inttypes.h.html">&lt;inttypes.h&gt;</a></i>.
<h5><a name = "tag_000_010_276_007">&nbsp;</a>Declarations</h5>
The following are declared as functions and may also be defined
as macros.
Function prototypes must be provided for use with an ISO C
compiler.
<pre>
<code>
int          <a href="access.html">access</a>(const char *, int);
unsigned int <a href="alarm.html">alarm</a>(unsigned int);
int          <a href="brk.html">brk</a>(void *);
int          <a href="chdir.html">chdir</a>(const char *);
int          <a href="chroot.html">chroot</a>(const char *); <b>(LEGACY)</b>
int          <a href="chown.html">chown</a>(const char *, uid_t, gid_t);
int          <a href="close.html">close</a>(int);
size_t       <a href="confstr.html">confstr</a>(int, char *, size_t);
char        *<a href="crypt.html">crypt</a>(const char *, const char *);
char        *<a href="ctermid.html">ctermid</a>(char *);
char        *<a href="cuserid.html">cuserid</a>(char *s); <b>(LEGACY)</b>
int          <a href="dup.html">dup</a>(int);
int          <a href="dup2.html">dup2</a>(int, int);
void         <a href="encrypt.html">encrypt</a>(char[64], int);
int          <a href="execl.html">execl</a>(const char *, const char *, ...);
int          <a href="execle.html">execle</a>(const char *, const char *, ...);
int          <a href="execlp.html">execlp</a>(const char *, const char *, ...);
int          <a href="execv.html">execv</a>(const char *, char *const []);
int          <a href="execve.html">execve</a>(const char *, char *const [], char *const []);
int          <a href="execvp.html">execvp</a>(const char *, char *const []);
void        <a href="_exit.html">_exit</a>(int);
int          <a href="fchown.html">fchown</a>(int, uid_t, gid_t);
int          <a href="fchdir.html">fchdir</a>(int);
int          <a href="fdatasync.html">fdatasync</a>(int);
pid_t        <a href="fork.html">fork</a>(void);
long int     <a href="fpathconf.html">fpathconf</a>(int, int);
int          <a href="fsync.html">fsync</a>(int);
int          <a href="ftruncate.html">ftruncate</a>(int, off_t);
char        *<a href="getcwd.html">getcwd</a>(char *, size_t);
int          <a href="getdtablesize.html">getdtablesize</a>(void); <b>(LEGACY)</b>
gid_t        <a href="getegid.html">getegid</a>(void);
uid_t        <a href="geteuid.html">geteuid</a>(void);
gid_t        <a href="getgid.html">getgid</a>(void);
int          <a href="getgroups.html">getgroups</a>(int, gid_t []);
long         <a href="gethostid.html">gethostid</a>(void);
char        *<a href="getlogin.html">getlogin</a>(void);
int          <a href="getlogin_r.html">getlogin_r</a>(char *, size_t);
int          <a href="getopt.html">getopt</a>(int, char * const [], const char *);
int          <a href="getpagesize.html">getpagesize</a>(void); <b>(LEGACY)</b>
char        *<a href="getpass.html">getpass</a>(const char *); <b>(LEGACY)</b>
pid_t        <a href="getpgid.html">getpgid</a>(pid_t);
pid_t        <a href="getpgrp.html">getpgrp</a>(void);
pid_t        <a href="getpid.html">getpid</a>(void);
pid_t        <a href="getppid.html">getppid</a>(void);
pid_t        <a href="getsid.html">getsid</a>(pid_t);
uid_t        <a href="getuid.html">getuid</a>(void);
char        *<a href="getwd.html">getwd</a>(char *);
int          <a href="isatty.html">isatty</a>(int);
int          <a href="lchown.html">lchown</a>(const char *, uid_t, gid_t);
int          <a href="link.html">link</a>(const char *, const char *);
int          <a href="lockf.html">lockf</a>(int, int, off_t);
off_t        <a href="lseek.html">lseek</a>(int, off_t, int);
int          <a href="nice.html">nice</a>(int);
long int     <a href="pathconf.html">pathconf</a>(const char *, int);
int          <a href="pause.html">pause</a>(void);
int          <a href="pipe.html">pipe</a>(int [2]);
ssize_t      <a href="pread.html">pread</a>(int, void *, size_t, off_t);
int          <a href="pthread_atfork.html">pthread_atfork</a>(void (*)(void), void (*)(void),
                 void(*)(void));
ssize_t      <a href="pwrite.html">pwrite</a>(int, const void *, size_t, off_t);
ssize_t      <a href="read.html">read</a>(int, void *, size_t);
int          <a href="readlink.html">readlink</a>(const char *, char *, size_t);
int          <a href="rmdir.html">rmdir</a>(const char *);
void        *<a href="sbrk.html">sbrk</a>(intptr_t);
int          <a href="setgid.html">setgid</a>(gid_t);
int          <a href="setpgid.html">setpgid</a>(pid_t, pid_t);
pid_t        <a href="setpgrp.html">setpgrp</a>(void);
int          <a href="setregid.html">setregid</a>(gid_t, gid_t);
int          <a href="setreuid.html">setreuid</a>(uid_t, uid_t);
pid_t        <a href="setsid.html">setsid</a>(void);
int          <a href="setuid.html">setuid</a>(uid_t);
unsigned int <a href="sleep.html">sleep</a>(unsigned int);
void         <a href="swab.html">swab</a>(const void *, void *, ssize_t);
int          <a href="symlink.html">symlink</a>(const char *, const char *);
void         <a href="sync.html">sync</a>(void);
long int     <a href="sysconf.html">sysconf</a>(int);
pid_t        <a href="tcgetpgrp.html">tcgetpgrp</a>(int);
int          <a href="tcsetpgrp.html">tcsetpgrp</a>(int, pid_t);
int          <a href="truncate.html">truncate</a>(const char *, off_t);
char        *<a href="ttyname.html">ttyname</a>(int);
int          <a href="ttyname_r.html">ttyname_r</a>(int, char *, size_t);
useconds_t   <a href="ualarm.html">ualarm</a>(useconds_t, useconds_t);
int          <a href="unlink.html">unlink</a>(const char *);
int          <a href="usleep.html">usleep</a>(useconds_t);
pid_t        <a href="vfork.html">vfork</a>(void);
ssize_t      <a href="write.html">write</a>(int, const void *, size_t);
</code>
</pre>
<p>
The following external variables are declared:
<pre>
<code>
extern char   *optarg;
extern int    optind, opterr, optopt;
</code>
</pre>
</blockquote><h4><a name = "tag_000_010_277">&nbsp;</a>APPLICATION USAGE</h4><blockquote>
None.
</blockquote><h4><a name = "tag_000_010_278">&nbsp;</a>FUTURE DIRECTIONS</h4><blockquote>
None.
</blockquote><h4><a name = "tag_000_010_279">&nbsp;</a>SEE ALSO</h4><blockquote>
<i><a href="access.html">access()</a></i>,
<i><a href="alarm.html">alarm()</a></i>,
<i><a href="chdir.html">chdir()</a></i>,
<i><a href="chown.html">chown()</a></i>,
<i><a href="close.html">close()</a></i>,
<i><a href="crypt.html">crypt()</a></i>,
<i><a href="ctermid.html">ctermid()</a></i>,
<i><a href="dup.html">dup()</a></i>,
<i><a href="encrypt.html">encrypt()</a></i>,
<i><a href="environ.html">environ()</a></i>,
<i><a href="exec.html">exec</a></i>,
<i><a href="exit.html">exit()</a></i>,
<i><a href="fchdir.html">fchdir()</a></i>,
<i><a href="fchown.html">fchown()</a></i>,
<i><a href="fcntl.html">fcntl()</a></i>,
<i><a href="fork.html">fork()</a></i>,
<i><a href="fpathconf.html">fpathconf()</a></i>,
<i><a href="fsync.html">fsync()</a></i>,
<i><a href="ftruncate.html">ftruncate()</a></i>,
<i><a href="getcwd.html">getcwd()</a></i>,
<i><a href="getegid.html">getegid()</a></i>,
<i><a href="geteuid.html">geteuid()</a></i>,
<i><a href="getgid.html">getgid()</a></i>,
<i><a href="getgroups.html">getgroups()</a></i>,
<i><a href="gethostid.html">gethostid()</a></i>,
<i><a href="getlogin.html">getlogin()</a></i>,
<i><a href="getpgid.html">getpgid()</a></i>,
<i><a href="getpgrp.html">getpgrp()</a></i>,
<i><a href="getpid.html">getpid()</a></i>,
<i><a href="getppid.html">getppid()</a></i>,
<i><a href="getsid.html">getsid()</a></i>,
<i><a href="getuid.html">getuid()</a></i>,
<i><a href="getwd.html">getwd()</a></i>,
<i><a href="isatty.html">isatty()</a></i>,
<i><a href="lchown.html">lchown()</a></i>,
<i><a href="link.html">link()</a></i>,
<i><a href="lockf.html">lockf()</a></i>,
<i><a href="lseek.html">lseek()</a></i>,
<i><a href="nice.html">nice()</a></i>,
<i><a href="pathconf.html">pathconf()</a></i>,
<i><a href="pause.html">pause()</a></i>,
<i><a href="pipe.html">pipe()</a></i>,
<i><a href="read.html">read()</a></i>,
<i><a href="readlink.html">readlink()</a></i>,
<i><a href="rmdir.html">rmdir()</a></i>,
<i><a href="setgid.html">setgid()</a></i>,
<i><a href="setpgid.html">setpgid()</a></i>,
<i><a href="setpgrp.html">setpgrp()</a></i>,
<i><a href="setregid.html">setregid()</a></i>,
<i><a href="setreuid.html">setreuid()</a></i>,
<i><a href="setsid.html">setsid()</a></i>,
<i><a href="setuid.html">setuid()</a></i>,
<i><a href="sleep.html">sleep()</a></i>,
<i><a href="swab.html">swab()</a></i>,
<i><a href="symlink.html">symlink()</a></i>,
<i><a href="sync.html">sync()</a></i>,
<i><a href="sysconf.html">sysconf()</a></i>,
<i><a href="tcgetpgrp.html">tcgetpgrp()</a></i>,
<i><a href="tcsetpgrp.html">tcsetpgrp()</a></i>,
<i><a href="truncate.html">truncate()</a></i>,
<i><a href="ttyname.html">ttyname()</a></i>,
<i><a href="ualarm.html">ualarm()</a></i>,
<i><a href="unlink.html">unlink()</a></i>,
<i><a href="usleep.html">usleep()</a></i>,
<i><a href="vfork.html">vfork()</a></i>,
<i><a href="write.html">write()</a></i>,
<i><a href="limits.h.html">&lt;limits.h&gt;</a></i>,
<i><a href="systypes.h.html">&lt;sys/types.h&gt;</a></i>,
<i><a href="termios.h.html">&lt;termios.h&gt;</a></i>,
<xref href=conformance></xref>.
</blockquote><hr size=2 noshade>
<center><font size=2>
UNIX &reg; is a registered Trademark of The Open Group.<br>
Copyright &copy; 1997 The Open Group
<br> [ <a href="../index.html">Main Index</a> | <a href="../xshix.html">XSH</a> | <a href="../xcuix.html">XCU</a> | <a href="../xbdix.html">XBD</a> | <a href="../cursesix.html">XCURSES</a> | <a href="../xnsix.html">XNS</a> ]

</font></center><hr size=2 noshade>
</body></html>
